package com.config;

import com.entity.FactoryBeanEntity;
import org.springframework.beans.factory.FactoryBean;

public class FactoryBeanConfig implements FactoryBean<FactoryBeanEntity> {
    @Override
    public FactoryBeanEntity getObject() throws Exception {
        return new FactoryBeanEntity();
    }

    @Override
    public Class<?> getObjectType() {
        return FactoryBeanEntity.class;
    }

    @Override
    public boolean isSingleton() {
        // 是否为单例 true为单例 false 为多例
        return true;
    }
}
